package ru.nosport.matrixaria.core;

/**
 * 
 * User: astel1
 * Date: Oct 5, 2006
 * Time: 5:16:17 PM
 *
 */
public class MessageHandlerException extends Exception {
	public MessageHandlerException(String _message) {
		super("Message handler error: " + _message);
	}

	public MessageHandlerException(Throwable _th){
		super(_th);
	}

	public MessageHandlerException(String _message, Throwable _cause) {
		super(_message, _cause);
	}

	@Override
	public String getMessage(){
		StringBuffer ret = new StringBuffer();

		ret.append(super.getMessage()+"\n");

		StackTraceElement[] els = this.getStackTrace();

		for(StackTraceElement tmp : els){
			ret.append(tmp.toString()+"\n");
		}

		return ret.toString();
	}
}
